<template>
  <div class="row justify-content-center">
    <div class="col-8">
      <div v-if="roomCommunity">
        <h2 class="jh-entity-heading" data-cy="roomCommunityDetailsHeading"><span>RoomCommunity</span> {{ roomCommunity.id }}</h2>
        <dl class="row jh-entity-details">
          <dt>
            <span>Name</span>
          </dt>
          <dd>
            <span>{{ roomCommunity.name }}</span>
          </dd>
          <dt>
            <span>Average</span>
          </dt>
          <dd>
            <span>{{ roomCommunity.average }}</span>
          </dd>
          <dt>
            <span>Building Type</span>
          </dt>
          <dd>
            <span>{{ roomCommunity.buildingType }}</span>
          </dd>
          <dt>
            <span>Property Costs</span>
          </dt>
          <dd>
            <span>{{ roomCommunity.propertyCosts }}</span>
          </dd>
          <dt>
            <span>Property Company</span>
          </dt>
          <dd>
            <span>{{ roomCommunity.propertyCompany }}</span>
          </dd>
          <dt>
            <span>Developer</span>
          </dt>
          <dd>
            <span>{{ roomCommunity.developer }}</span>
          </dd>
          <dt>
            <span>Building No</span>
          </dt>
          <dd>
            <span>{{ roomCommunity.buildingNo }}</span>
          </dd>
          <dt>
            <span>Room No</span>
          </dt>
          <dd>
            <span>{{ roomCommunity.roomNo }}</span>
          </dd>
          <dt>
            <span>Nearby Stores</span>
          </dt>
          <dd>
            <span>{{ roomCommunity.nearbyStores }}</span>
          </dd>
          <dt>
            <span>Focus No</span>
          </dt>
          <dd>
            <span>{{ roomCommunity.focusNo }}</span>
          </dd>
        </dl>
        <button type="submit" v-on:click.prevent="previousState()" class="btn btn-info" data-cy="entityDetailsBackButton">
          <font-awesome-icon icon="arrow-left"></font-awesome-icon>&nbsp;<span> Back</span>
        </button>
        <router-link
          v-if="roomCommunity.id"
          :to="{ name: 'RoomCommunityEdit', params: { roomCommunityId: roomCommunity.id } }"
          custom
          v-slot="{ navigate }"
        >
          <button @click="navigate" class="btn btn-primary">
            <font-awesome-icon icon="pencil-alt"></font-awesome-icon>&nbsp;<span> Edit</span>
          </button>
        </router-link>
      </div>
    </div>
  </div>
</template>

<script lang="ts" src="./room-community-details.component.ts"></script>
